package by.brest.bspc.reporter.jasperreports.connectors;

import com.jaspersoft.mongodb.connection.MongoDbConnection;

/**
 * This class contains parameters and methods for mongoDB connection.
 *
 * @date: 02.10.13 16:46
 * @author: Natallia
 */
public class MongoConnectionImpl implements MongoConnection {
    private MongoDbConnection connectionInstance;

    public MongoConnectionImpl(MongoDbConnection connectionInstance) {
        this.connectionInstance = connectionInstance;
    }

    public MongoDbConnection getConnectionInstance() {
        return connectionInstance;
    }

    public void setConnectionInstance(MongoDbConnection connectionInstance) {
        this.connectionInstance = connectionInstance;
    }

    public void close() {
        this.connectionInstance.close();
    }

    @Override
    public String toString() {
        return "MongoConnectionImpl{" +
                ", connectionInstance=" + connectionInstance +
                '}';
    }
}
